<?xml version="1.0" encoding="utf-8"?>
<!--
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
        
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
        
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
        MA 02110-1301, USA.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="html" omit-xml-declaration="yes"/>
	<xsl:template match="/">
		<div>
			<button style="width:200px" onClick="javascript:GetXLStable($('#xlstable').html());">Download XLS...</button>
			<table width="100%" id="xlstable">
				<tr bgcolor="#CCCCCC">
					<td align="center">SP code</td>
					<td align="center">Description</td>
					<td align="center">Q-ty</td>
					<td align="center">Group</td>
					<td align="center">SP Price</td>
				</tr>
				<xsl:for-each select="main/spcodetable">
					<tr bgcolor="#EEEEEE">
						<xsl:if test="position() mod 2 = 0">
							<xsl:attribute name="bgcolor">#CCCCCC</xsl:attribute>
						</xsl:if>
						<td align="center"><xsl:value-of select="code"/></td>
						<td align="left"><xsl:value-of select="description"/></td>
						<td align="center"><xsl:value-of select="quantity"/></td>
						<td align="center"><xsl:value-of select="group"/></td>
						<td align="right"><xsl:value-of select="gprice"/></td>
					</tr>
				</xsl:for-each>
			</table>
		</div>
    </xsl:template>
</xsl:stylesheet>
